
enum
{
	CC_BLINK_NOCHANGE = 0,
	CC_BLINK_FAST     = 500,
	CC_BLINK_NORMAL   = 1000,
	CC_BLINK_SLOW     = 2000
};

enum
{
	CC_BLINK_TEXT = 1,
	CC_BLINK_BK   = 2,
	CC_BLINK_BOTH = CC_BLINK_TEXT|CC_BLINK_BK
};

#define CC_SYSCOLOR(ind) (0x80000000|((ind) & ~CLR_DEFAULT))

class CColorPushButton : public CButton
{
public:
	CColorPushButton(){m_fNoFocus = false; m_fNoDisabledState = false; m_fDisabledStateIsGray = true;}
public:
	void SetBkColor(COLORREF rgbBk = CLR_DEFAULT);
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CColorPushButton)
	protected:
	virtual void PreSubclassWindow();
	virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
	//}}AFX_VIRTUAL
	
	void SetNoFocus(bool fNoFocus = true){m_fNoFocus = fNoFocus;}
	void SetNoDisabledState(bool fNoDisabledState = true) {m_fNoDisabledState = fNoDisabledState;}
	void SetNoDisabledStatsIsGray( bool fDisabledStateIsGray = false ) { m_fDisabledStateIsGray = fDisabledStateIsGray; }

	COLORREF m_rgbBk;
	CBrush m_brBk;
protected:
	void ChangeStyle();
	bool m_fNoFocus;
	bool m_fNoDisabledState;
	bool m_fDisabledStateIsGray;			// $MS: if button is in disabled state, background color is BTNFACE

	//{{AFX_MSG(CColorPushButton)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

